import tool from '../tool'

export default  {
  refreshModal(type){
    let selector = `.ui.modal_com.basic.modal.${type}`;
    let refresh_times = 0
    let interval = window.setInterval(() => {
      refresh_times++;
      // let fit=$(selector).modal('can fit');
      // tool.cl('fit:', fit);
      // if(refresh_times>5||fit) {
      if (refresh_times > 5) {
        window.clearInterval(interval);
      } else
        $(selector).modal('refresh');

    }, 300);
  }
}
